// Geometric Tools, Inc.
// http://www.geometrictools.com
// Copyright (c) 1998-2006.  All Rights Reserved
//
// The Wild Magic Library (WM3) source code is supplied under the terms of
// the license agreement
//     http://www.geometrictools.com/License/WildMagic3License.pdf
// and may not be copied or disclosed except in accordance with the terms
// of that agreement.

#ifndef WM3COLLAPSERECORDARRAY_H
#define WM3COLLAPSERECORDARRAY_H

#include "Wm3FoundationLIB.h"
#include "Wm3Object.h"
#include "Wm3CollapseRecord.h"

namespace Wm3
{

class WM3_ITEM CollapseRecordArray : public Object
{
    WM3_DECLARE_RTTI;
    WM3_DECLARE_NAME_ID;
    WM3_DECLARE_STREAM;

public:
    CollapseRecordArray (int iQuantity = 0, CollapseRecord* akArray = 0);
    CollapseRecordArray (const CollapseRecordArray& rkShared);
    virtual ~CollapseRecordArray ();

    CollapseRecordArray& operator= (const CollapseRecordArray& rkShared);

    int GetQuantity () const;
    CollapseRecord* GetData () const;
    operator const CollapseRecord* () const;
    operator CollapseRecord* ();
    const CollapseRecord& operator[] (int i) const;
    CollapseRecord& operator[] (int i);

protected:
    int m_iQuantity;
    CollapseRecord* m_akArray;
};

WM3_REGISTER_STREAM(CollapseRecordArray);
typedef Pointer<CollapseRecordArray> CollapseRecordArrayPtr;
#include "Wm3CollapseRecordArray.inl"

}

#endif
